<?php
namespace app\manage\validate;

class Api extends BaseValidate
{
    // 验证规则
    protected $rule = [
        'api_cate_id' => ['integer', 'egt' => 0],
        'action_flag' => ['alphaNum', 'length' => '2,50'],
        'module' => ['length' => '2,50'],
        'controller' => ['length' => '2,50'],
        'action' => ['length' => '2,50'],
        'text_data' => ['min' => '2'],
        'need_login' => ['in' => '0,1'],
        'author' => ['length' => '2,20'],
        'job_schedule' => ['between' => '-2,1'],
    ];
    // 验证消息
    protected $message = [
        'api_cate_id.integer' => '分类ID必须存在且为大于等于0的[整数]',
        'api_cate_id.egt' => '分类ID必须存在且为[大于等于0]的整数',
    ];
}